<template>
  <div class="wrapper">
    <user-list :identity="2" :engineeringSupervisionList="engineeringSupervisionList"></user-list>
  </div>
</template>

<script>
  import userList from "@/components/UserList/index.vue";
  import adminApi from "@/api/adminApi";
  // import { getExternalUserInfo } from "@/utils/auth";

  export default {
    name: "",
    components: {
      userList,
    },
    data() {
      return {
        project_key: "",
        guid: "",
        project_id: "",
        admin_addAdmin: true,
        gather: [],
        userInfo: {},
        engineeringSupervisionList: []
      };
    },
    mounted() {
      this.getAdminList();
    },
    methods: {
      getHtmlAuthority(project_key) {
        ApiMenu.getHtmlAuthority({
            path: this.$route.path,
            project_key,
            guid: this.guid,
          },
          this.project_key
        ).then((res) => {
          console.log(res, "getHtmlAuthority");
          if (res.code == 200) {
            if (!Array.isArray(res.data)) {
              this.admin_addAdmin = res.data.admin_addAdmin;
              this.gather = res.data.gather;
            }
          }
        });
      },
      getAdminList() {
        var obj = {
          page: 1,
          num: 9999,
          keyword: '',
          province_id: "",
          city_id: "",
          county_id: "",
          identity: 1,
          position_id_arr: [8]
        };
        adminApi
          .getAdminList(obj)
          .then((res) => {
            console.log(res, "工程监理");
            if (res.code == 200) {
              this.engineeringSupervisionList = res.data.list;
            } else {
              this.$message({
                message: res.message,
                type: "warning",
              });
            }
          })
          .catch((err) => {});
      },
    },
  };

</script>

<style lang="scss" scoped>
  .wrapper {
    padding: 15px;
    height: 100%;
  }

</style>
